#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
#include<vector>
using namespace std;

class Solution {
public:
    int longestContinuousSubstring(string s) {
        int ans = 1, cur = 1;
        for (int i = 1; i < s.size(); ++i)
        {
            if (s[i] == s[i - 1] + 1) ++cur;
            else cur = 1;
            ans = max(ans, cur);
        }
        return ans;
    }

    int missingNumber(vector<int>& nums) {
        int ans = 0, n = nums.size();
        for (int num : nums)
        {
            ans ^= num;
        }
        for (int i = 0; i <= n; ++i)
        {
            ans ^= i;
        }
        return ans;
    }

    vector<int> missingTwo(vector<int>& nums) {
        int a = 0, n = nums.size() + 2;
        for (int num : nums)
        {
            a ^= num;
        }
        for (int i = 1; i <= n; ++i)
        {
            a ^= i;
        }
        int lsb = a & (-a);
        int num1 = 0, num2 = 0;
        for (int num : nums)
        {
            if (num & lsb) num1 ^= num;
            else num2 ^= num;
        }
        for (int i = 1; i <= n; ++i)
        {
            if (i & lsb) num1 ^= i;
            else num2 ^= i;
        }
        return { num1,num2 };
    }
};